package com.lyx.server.entity;

import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.math.BigDecimal;
import java.util.Date;
import lombok.Data;
import lombok.NoArgsConstructor;

/**
 * ⽤户佣⾦变动表
 * @TableName t_user_kickback
 */
@TableName(value ="t_user_kickback")
@NoArgsConstructor
@Data
public class UserKickback implements Serializable {
    /**
     * 序号，主键
     */
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    /**
     * ⽤户id
     */
    @TableField(value = "uid")
    private Integer uid;

    /**
     * 类型
     */
    @TableField(value = "type")
    private String type;

    /**
     * 佣⾦
     */
    @TableField(value = "money")
    private double money;

    /**
     * 原因
     */
    @TableField(value = "reason")
    private String reason;

    /**
     * 创建时间
     */
    @TableField(value = "create_time")
    private Date createTime;

    @TableField(exist = false)
    private static final long serialVersionUID = 1L;

    public UserKickback(Integer uid, String type, double money, String reason) {
        this.uid = uid;
        this.type = type;
        this.money = money;
        this.reason = reason;
        this.createTime = new Date();
    }
}
